﻿namespace Jumpton.SFA.Server.Entity
{
    using System;
    using System.Collections.Generic;
    using System.Text;
    using Jumpton.Persistent;
    using System.Data;
    using System.Runtime.Serialization;


    [System.SerializableAttribute()]
    [RelationMap("DictionaryItems", typeof(DictionaryItems), "a")]
    [Relation(RelationJoinType.Inner, typeof(Dictionary), "b", "a", "DictionaryID", "DictionaryID")]
    public class DICTIONARYVIEW : ObjectRow
    {

        public DICTIONARYVIEW()
        {
        }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="dataRow">DataTable 中的一行数据</param>
        /// <param name="objectTable">存储当前对象的数据表格</param>
        public DICTIONARYVIEW(System.Data.DataRow dataRow, ObjectTable parent) :
            base(dataRow, parent)
        {
        }

        /// <summary>
        /// 供反序列化使用的构造函数
        /// </summary>
        /// <param name="info"></param>
        /// <param name="context"></param>
        protected DICTIONARYVIEW(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) :
            base(info, context)
        {
        }

        [Key("DictionaryItemID", TableAlias = "a")]
        public decimal DictionaryItemID
        {
            get
            {
                return (System.Decimal)GetValue("DictionaryItemID");
            }
            set
            {
                SetValue("DictionaryItemID", value);
            }
        }

        [Field("DictionaryID", TableAlias = "a")]
        public decimal DictionaryID
        {
            get
            {
                return (System.Decimal)GetValue("DictionaryID");
            }
            set
            {
                SetValue("DictionaryID", value);
            }
        }

        [Field("Name", TableAlias = "a")]
        public string Name
        {
            get
            {
                return (System.String)GetValue("Name");
            }
            set
            {
                SetValue("Name", value);
            }
        }

        [Field("Active", TableAlias = "a")]
        public bool Active
        {
            get
            {
                return (System.Boolean)GetValue("Active");
            }
            set
            {
                SetValue("Active", value);
            }
        }

        [Field("REC_TIME_STAMP", TableAlias = "a")]
        public decimal LAST_UPDATE_TIME
        {
            get
            {
                return (System.Decimal)GetValue("LAST_UPDATE_TIME");
            }
            set
            {
                SetValue("LAST_UPDATE_TIME", value);
            }
        }

        [Field("REC_USER_CODE", TableAlias = "a")]
        public string RECUSERCODE
        {
            get
            {
                return (System.String)GetValue("RECUSERCODE");
            }
            set
            {
                SetValue("RECUSERCODE", value);
            }
        }

        [Field("Code", TableAlias = "a")]
        public string Code
        {
            get
            {
                return (System.String)GetValue("Code");
            }
            set
            {
                SetValue("Code", value);
            }
        }

        [Field("Locked", TableAlias = "a")]
        public Boolean Locked
        {
            get
            {
                return (Boolean)GetValue("Locked");
            }
            set
            {
                SetValue("Locked", value);
            }
        }

        [Field("DOMAIN_ID", TableAlias = "a")]
        public decimal DOMAINID
        {
            get
            {
                return (System.Decimal)GetValue("DOMAINID");
            }
            set
            {
                SetValue("DOMAINID", value);
            }
        }

        [Field("Code", TableAlias = "b")]
        public string DictionaryCode
        {
            get
            {
                return (System.String)GetValue("DictionaryCode");
            }
            set
            {
                SetValue("DictionaryCode", value);
            }
        }
    }
}
